package com.dubbo.consumer;

import com.dubbo.service.api.FooService;
import com.dubbo.service.api.mainpk.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Consumer {
    public static void main(String[] args){
        ApplicationContext ac = new ClassPathXmlApplicationContext("consumer.xml");
        ((ClassPathXmlApplicationContext) ac).start();//启动消费者测试项目

        System.out.print("Consumer Start......");
        FooService Us = (FooService)ac.getBean("permissionService");
        System.out.print("consumer"+'\n');
        User me = new User();
        me.setId("now123334");
        me.setName("李白123qwe");
        Us.insert(me);
        System.out.print(Us.doSomeBusinessStuff("ui"));
        System.out.print(Us.getAllUser());
    }
}